package org.flashamaphone.voices.drums
{
	import org.flashamaphone.voices.ADSRVoice;
	import org.flashamaphone.voices.ADSRVoiceConfig;
	import org.flashamaphone.voices.waveformFactories.WhiteNoiseFactory;
	import org.flashamaphone.voices.envelope.LinearEnvelope;
	
	public class Snare extends ADSRVoice
	{
		public function Snare(volume:Number = 1)
		{	
			this.volume = volume;
			var cfg:ADSRVoiceConfig = new ADSRVoiceConfig( new WhiteNoiseFactory() );
			cfg.sustainDuration = 10;
			cfg.decayDuration = 10;
			cfg.attackDuration = 10;
			cfg.releaseDuration = 200;
			
			cfg.attackEnvelope = new LinearEnvelope(0, 2);
			cfg.decayEnvelope = new LinearEnvelope(2, 1);
			cfg.sustainEnvelope = new LinearEnvelope(1, .3);
			cfg.releaseEnvelope = new LinearEnvelope(.3, 0);
			
			super(cfg);
		}
	}
}